package com.gt.vo;

import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * @author 作者: Xu Qiang
 * @version 创建时间: 2019年12月3日 下午2:55:53
 * @description 描述:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class SysResult implements Serializable{
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private Integer status;	//定义200正常,201失败
    private String msg;		//服务器返回客户端消息
    private Object data;	//服务器返回客户端数据
    public static SysResult success() {
        return new SysResult(200,null,null);
    }
    public static SysResult success(Object object) {
        return new SysResult(200,null,object);
    }
    public static SysResult success(String msg,Object data) {
        return new SysResult(200,msg,data);
    }
    public static SysResult fail() {
        return new SysResult(201,null,null);
    }
    public static SysResult fail(String msg) {
        return new SysResult(201,msg,null);
    }
    public static SysResult fail(String msg,Object data) {
        return new SysResult(201,msg,data);
    }


}
